# 时间显示(好题, 类似的时间模块需要记忆的较多)
from datetime import *


def show_time(timestramp):
    start_time = datetime(1970, 1, 1)
    milsec = timestramp % (24 * 3600 * 1000)
    delta = timedelta(milliseconds=milsec)
    res = start_time + delta
    return res.strftime("%H:%M:%S")


def show_time_opt(timestramp):
    inp = datetime.fromtimestamp(timestramp // 1000, tz=timezone.utc)
    return inp.strftime("%H:%M:%S")


if __name__ == '__main__':
    print(show_time(46800999))  # 13:00:00
    print(show_time(1618708103123)) # 01:08:23
